<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>事件的监听</title>
</head>
<body>
    <button id="btn">test</button>
    <button id="btn1">once</button>
    <script>
        // addEventListener 支持三个参数  

        btn.addEventListener('click',function(e){
            alert(e)
        })

        btn1.addEventListener('click',function(e){
            alert('once')
        },{once:true})


    </script>
</body>
</html>